<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>
        //es6参数只支持可变参数 ... ...出现在最后,是一个参数数组
        let register = (name,age,...params)=>{
            //  params 剩余的参数数组
        }


        //...变异用法 , 复制数组和对象
        let a1 = [1,2,3];
        let a2 = [4,5,6];
        let a3 = [...a1,...a2];

        let p1 = {name:"二狗子"}
        let p2 = {age : 18}
        let p3 = {...p1,...p2};

    </script>
    
</body>
</html>